package com.example.basic02;

// 单例模式 DCL
public class DCL {
    private static volatile DCL instance = null;


    public static DCL getInstance() {
        if (instance == null) {
            synchronized (DCL.class) {
                if (instance == null) {
                    instance = new DCL();
                }
            }
        }
        return instance;
    }

    public static void main(String[] args) {

    }
}
